package ch.app.service.impl;

import ch.app.dao.address.AddressDao;
import ch.app.entity.db.Address;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service(value = "addressService")
public class AddressServiceImpl {
      
    @Autowired  
    private AddressDao addressDao;
      

    public void updateAddress() {
        addressDao.updateAddress();
    }

    public List<Address> listAddress(int pageNum) {
        PageHelper.startPage(pageNum, 2);
        List<Address> list = addressDao.listAddress();
        return list;
    }
}  